From: Keir Fraser Date: Thu, 10 Apr 2008 08:12:44 +0000 (+0100) Subject: hvmloader: Fix build with gcc 4.1 and later. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14231^2~33 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=f342e8630c889e9f093d61c76e38921af09a7adc;p=xen.git hvmloader: Fix build with gcc 4.1 and later. Signed-off-by: Keir Fraser --- diff --git a/tools/firmware/hvmloader/hvmloader.c b/tools/firmware/hvmloader/hvmloader.c index 361c5c190a..f27191cf29 100644 --- a/tools/firmware/hvmloader/hvmloader.c +++ b/tools/firmware/hvmloader/hvmloader.c @@ -360,7 +360,7 @@ static int scan_etherboot_nic(void *copy_rom_dest) for ( ; ; ) { /* Invalid signature means we're out of option ROMs. */ - if ( strncmp(rom->signature, "\x55\xaa", 2) || + if ( strncmp((char *)rom->signature, "\x55\xaa", 2) || (rom->rom_size == 0) ) break; @@ -375,7 +375,7 @@ static int scan_etherboot_nic(void *copy_rom_dest) pcih = (struct option_rom_pci_header *) ((char *)rom + rom->pci_header_offset); if ( (rom->pci_header_offset != 0) && - !strncmp(pcih->signature, "PCIR", 4) && + !strncmp((char *)pcih->signature, "PCIR", 4) && (pcih->vendor_id == vendor_id) && (pcih->device_id == device_id) ) goto found; @@ -393,7 +393,7 @@ static int scan_etherboot_nic(void *copy_rom_dest) ? ((struct option_rom_pnp_header *) ((char *)rom + rom->expansion_header_offset)) : ((struct option_rom_pnp_header *)NULL)); - while ( (pnph != NULL) && strncmp(pnph->signature, "$PnP", 4) ) + while ( (pnph != NULL) && strncmp((char *)pnph->signature, "$PnP", 4) ) pnph = ((pnph->next_header_offset != 0) ? ((struct option_rom_pnp_header *) ((char *)rom + pnph->next_header_offset))